<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/WEB-INF/tld/jmesa.tld" prefix="jmesa" %> 
<%@ taglib prefix="c" uri="/WEB-INF/tld/c.tld" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><strong>中标结果</strong></title>
<link href="/estate/css/css.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="/estate/js/jquery-1.2.2.pack.js"></script>
    <script type="text/javascript" src="/estate/js/jquery-1.3.min.js"></script> 
    <script type="text/javascript" src="/estate/js/jquery.jmesa.js"></script>
    <script type="text/javascript" src="/estate/js/jmesa.js"></script>              
    <link rel="stylesheet" type="text/css" href="/estate/css/jmesa.css"></link>
	<script type="text/javascript">
    	function selectAllItens() {
    		var cbArray = document.getElementsByName("cbMulti");
    		var all = document.getElementById("cbAll").checked;
    		for(var i = 0;i<cbArray.length;i++){
    			if(all){
    				cbArray[i].checked = true;
    			}else{
    				cbArray[i].checked = false;
    			}
    		}

		} 
		function enterMultiType(form){
			form.action="/estate/admin/announcementAction.action?method=list&multiType=true";

   			form.submit();
		}
		function enterSingleType(form){
			form.action="/estate/admin/announcementAction.action?method=list&multiType=false";

   			form.submit();
		}
		function multiDel() {
			form = form1;
			var cbArray = document.getElementsByName("cbMulti");
			var delStr = "";
			for(var i = 0;i<cbArray.length;i++){
    			if(cbArray[i].checked){
    				delStr= delStr+cbArray[i].value+",";
    			}
    		}
			form.action="/estate/admin/announcementAction.action?method=delete&multiDelete=true&delStr="+delStr;
   			form.submit();
		}
    </script>
</head>
<body>
<form  id="form1"  name="form1" action="" method="post">
<table border="0" cellpadding="0" cellspacing="0" style="background-image:url(/estate/images/gtbg.gif) " width="100%">
    <tr>
      <td width="50%" height="82" rowspan="2"><img src="/estate/images/guide_01.gif"></td>
      <td width="50%" style="background-image:url(/estate/images/guide_02.gif);color:#cc1212; font-size:16px; font-weight:bold; text-align:right; padding-right:50px; letter-spacing:1px; " height="39"><strong>中标公示</strong></td>
    </tr>
     <tr><td width="50%" style="background-image:url(/estate/images/guide_03.gif); height:43px;" align="center" valign="middle">
	  <table width="50%" border="0" cellspacing="0" cellpadding="0">
        <tr align="center">
          <c:if test="${requestScope.multiType != null}">
          	<c:if test="${requestScope.multiType}">
          		<td><input name="Submit1" type="button" onclick="enterSingleType(form1)" onFocus="this.blur();" class="button2" value="单选模式" > </td>
          		<td><input name="Submit1" type="button" onclick="multiDel()" onFocus="this.blur();" class="button2" value="批量删除" > </td>
          	</c:if>
          </c:if>
          <c:if test="${requestScope.multiType == null or !requestScope.multiType}">
          	<td><input name="Submit1" type="button" onclick="enterMultiType(form1)" onFocus="this.blur();" class="button2" value="批量模式"> </td>
          </c:if>
        </tr>
      </table></td>
    </tr>
</table><br>
<div align="center" >
	<div class="main" align="center" style="width:100%;height:400px;background-color: white;">
      <jmesa:struts2TableModel items="${list}" id="table" var="bean" stateAttr="restore" editable="true" exportTypes="excel"  toolbar="com.estate.utils.JmesaToolBarPage" >
          <jmesa:htmlTable width="100%" style="text-align:center;" caption="<div style='height:20px;text-align:center;'>中标公示列表</div>">
              <jmesa:htmlRow uniqueProperty="id">
              	  
              	  <c:if test="${requestScope.multiType != null and requestScope.multiType}">
	              	  <jmesa:htmlColumn editable="false" sortable="false" property="checkbox" title="<input id='cbAll' name='cbAll' type='checkbox' onclick='selectAllItens()'>全选/全不选</input>" ><input type="checkbox" id="cbMulti" name="cbMulti" value="${bean.id }"/></jmesa:htmlColumn>
              	  </c:if>
              	  <jmesa:htmlColumn property="id" sortable="true" title="序号"  editable="false"/>
                  <jmesa:htmlColumn property="tender.pro.proNum" editable="false" title="项目编号"/>
                  <jmesa:htmlColumn property="tendre.pro.proName" sortable="true" title="项目名称"  editable="false"/>
                  <jmesa:htmlColumn property="tender.tenderNum" sortable="true" title="标段编号"  editable="false"/>
                  <jmesa:htmlColumn property="tender.tenderName" editable="false" title="标段名称"/>
                  <jmesa:htmlColumn property="deadLineDate" editable="false" title="公告截止日期" />
                  <jmesa:htmlColumn property="now" editable="false" title="当前步骤" />
                  <jmesa:htmlColumn property="chuli" editable="false" title="处理" >
                  	<a href="#">处理</a>
                  </jmesa:htmlColumn>
                  
              </jmesa:htmlRow>
          </jmesa:htmlTable>
      </jmesa:struts2TableModel>
      </div>
</div>
<script type="text/javascript">
      function onInvokeAction(id){
          $.jmesa.setExportToLimit(id,'');
          $.jmesa.createHiddenInputFieldsForLimitAndSubmit(id);
      }  
      function onInvokeExportAction(id) {
			var parameterString = $.jmesa.createParameterStringForLimit(id);
			location.href = "testAction.action?method=export&" + parameterString;
      }
  </script>
  </form>
</body>
</html>
